//
//  FistPageCollectionHeaderView_Ht.m
//  WZLProduct
//
//  Created by dllo on 16/3/19.
//  Copyright © 2016年 HaiTeng. All rights reserved.
//

#import "FistPageCollectionHeaderView_Ht.h"

@interface FistPageCollectionHeaderView_Ht ()
@property (nonatomic, strong) UIView *modifiedView; /**< 标题前的修饰图 */
@end

@implementation FistPageCollectionHeaderView_Ht
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {

        self.modifiedView = [[UIView alloc] init];
        [self addSubview:_modifiedView];
        _modifiedView.backgroundColor = kAppearanceColor;
        [self.modifiedView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self).with.offset(15);
            make.left.equalTo(self).with.offset(15);
            make.bottom.equalTo(self).with.offset(-15);
            make.width.mas_equalTo(5);
     
        }];
        
        self.sectionTitle = [[UILabel alloc] init];
        [self addSubview:self.sectionTitle];
        [self.sectionTitle mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(self.modifiedView);
              make.left.equalTo(self.modifiedView.mas_right).with.offset(5);
            make.height.mas_equalTo(self.modifiedView);
            make.right.equalTo(self).with.offset(-50);
            
        }];
        
        self.rightButton = [UIButton buttonWithType:UIButtonTypeSystem];
        [self addSubview:self.rightButton];
        self.rightButton.tintColor = [UIColor lightGrayColor];
        [self.rightButton setTitle:@"全部 ＞" forState:UIControlStateNormal];
        self.rightButton.hidden = YES;
        [self.rightButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.mas_equalTo(50);
            make.top.equalTo(self.modifiedView);
            make.right.equalTo(self).with.offset(-15);
            make.bottom.equalTo(self.modifiedView);
        }];

        
    }
    return self;
}

@end
